A California appeals court ruling on Thursday avoided a shutdown of ride-hailing services Uber and Lyft in the state, effectively handing a decision over gig worker benefits and pay to voters in a November ballot measure.

The last-minute ruling, in a case with potential ripple effects across the global gig economy, means drivers can continue working as independent contractors while the appeals court considers the question of driver status.

The companies had threatened an imminent shutdown as early as midnight across California. They said they would be unable to comply with the state’s new law, which considers their drivers employees and not contractors, entitled to benefits such as minimum wage, overtime, sick pay and unemployment insurance.